Repository navigation
Migrate wallets off the shared default password - #13
Merged
Merged
Conversation
New wallets get a per-instance random password instead of the hardcoded hellorockstar default; it is written to walletunlock.json next to wallet.db as before, so the backup-file flow is unchanged. On startup, wallets whose unlock file still carries hellorockstar (or an empty password field that falls back to it) are migrated: after a successful unlock the script calls changepassword with a freshly generated random password and only then rewrites the unlock file. A failed rotation leaves the file untouched and is retried on the next start. The hellorockstar line-feed legacy variant still resolves first, then the migration runs on top of it. The seed mnemonic (or the Seed removed placeholder) is preserved byte for byte; only the wallet_password field is updated.
This was referenced Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New wallets no longer get the hardcoded
hellorockstarpassword - they receive a random per-instance password, written towalletunlock.jsonnext towallet.db(the same file BTCPay's seed backup view exposes), so the backup-file flow is unchanged.On startup, wallets whose unlock file still carries
hellorockstar(or an empty password field that falls back to it) are migrated:changepasswordon the still-locked wallet rotates to a freshly generated random password and unlocks in one call, and the unlock file is rewritten only after the RPC succeeds. A failed rotation leaves the old password working and is retried on the next start. Thehellorockstar\nline-feed legacy variant falls through to a secondchangepasswordattempt and migrates the same way. The cipher seed mnemonic (or theSeed removedplaceholder) is preserved untouched.Also fixes a latent quirk in the restart path: successful
unlockwalletreturns{}, which the old else-branch logged as failure and exited before reaching the Loop startup section.Verified locally against regtest:
hellorockstarwallet upgraded to this image: password rotated, file rewritten, restart unlocks from the filehellorockstar\nline-feed wallet: rotates via the fallback attempt